package com.apes.framework.config.dozer;


import com.apes.framework.jpa.spec.model.Filter;
import com.apes.framework.util.Tools;
import org.dozer.DozerConverter;

import java.util.Map;

/**
 * 功能：
 *
 * @author xul
 * @create 2018-07-10 8:55
 */
public class FilterDozerConverter extends DozerConverter<Map, Filter> {

    public FilterDozerConverter() {
        super(Map.class, Filter.class);
    }

    @Override
    public Filter convertTo(Map source, Filter destination) {
        return Tools.toBean(Filter.class,source);
    }

    @Override
    public Map convertFrom(Filter source, Map destination) {
        throw new IllegalStateException("Unknown value!");
    }
}